//
//  TestTableViewController.m
//  09-静态单元格
//
//  Created by Sizhu Ba on 2017/9/7.
//  Copyright © 2017年 mac. All rights reserved.
//

#import "TestTableViewController.h"
#import "CTMLObj.h"
#import "MLNodelObj.h"
#define QDEV_W = UIScreen.main.bounds.size.width
/// 网络请求完成回调，类似于 OC 的 typedef void (^RequestCallBack) (id result ,NSError* error);//定义返回的枚举
//typealias ZYLRequestCallBack = (_ result: Any?, _ error: NSError?)->()



@interface TestTableViewController ()

@property (nonatomic, strong) NSMutableArray<CTMLObj*> * companys;
@property (nonatomic, strong) NSMutableArray<NSMutableArray<MLNodelObj*>*> * tempNodes;
@property (nonatomic, strong) NSMutableArray<NSIndexPath *> * reloadArray;
@property (nonatomic, assign) BOOL preservation;
@property (nonatomic, assign) BOOL isInitializeed;
@end

@implementation TestTableViewController

/**
 * 宽度
 */
-(CGFloat)GETVW:(UIView *)view {
    
    return view.frame.size.width;
    
}
/**
 * 高度
 */
-(CGFloat)GETVH:(UIView *)view {
    
    return view.frame.size.height;
    
}
/**
 * 获取rect
 */
-(CGRect)QRect:(CGFloat)x andY:(CGFloat) y  andW:(CGFloat ) w andH:(CGFloat) h{
    
    return CGRectMake(x, y, w, h);
    
}
/**
 * 设置颜色
 */
-(UIColor *)RGBAsame:(CGFloat) RGB andA:(CGFloat) A {
    
    return [UIColor colorWithRed:RGB/255.0 green:RGB/255.0 blue:RGB/255.0 alpha:A];
    
}
- (void)viewDidLoad {
    [super viewDidLoad];
  // NSArray * arr = [NSArray new];
   
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark - Table view data source

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
 
    return 3;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
 
    return 1;
}
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
    NSLog(@"%ld",section);
    if (section > 0){
        return 1;
    }
    return 30;
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    
    NSLog(@"%@",indexPath);
}
-(NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section{
    if (section == 0){
        return @"TYPE";
    }
    if (section == 1){
         return @"POINT";
    }
    if (section == 2) {
        return @"我的积分规则是我的积分规则是我的积分规则是我的积分规则是我的积分规则是我的积分规则是我的积分规则是我的积分规则是我的积分规则是我的积分规则是";
    }
    return nil;
}
@end
